home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93a.txt / 000073_icon-group-sender _Sun Feb 28 22:53:28 1993.msg < prev    next >
Internet Message Format  |  1993-04-21  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Sun, 28 Feb 1993 17:14:05 MST
  2. Via: uk.ac.manchester.computer-science; Sun, 28 Feb 1993 23:10:55 +0000
  3. From: Steve Holden <steve@dtc.co.uk>
  4. Date: Sun, 28 Feb 93 22:53:28 GMT
  5. Message-Id: <2560.9302282253@desktop.desktop.co.uk>
  6. To: rjhare@festival.ed.ac.uk
  7. Subject: Re: environment variables
  8. Cc: icon-group@cs.arizona.edu
  9. Status: R
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12. Roger:
  13.  
  14. The example you quote of
  15.  
  16.     system("export DISPLAY=bandit.ucs:0")
  17.  
  18. doesn't work because system creates a subshell to run its commands in.
  19. Changing the environment in that shell doesn't affect the shell under
  20. whose control your program is running, and therefore a
  21.  
  22.     getenv("DISPLAY")
  23.  
  24. won't see the change you have made.  There should really be a setenv()
  25. primitive (oh, no, I'm going to get thirteen hundred piece of mail about
  26. feeping creaturism now ;-) -- but there isn't, as far as I can tell.
  27.  
  28. regards
  29.  Steve
  30.  
  31.  +---------------------------------+-------------------------------------+
  32.  | Steve Holden, Technical Director| Desktop Connection Limited          |
  33.  | steve@desktop.co.uk             | Manchester Science Park             |
  34.  |---------------------------------+ Lloyd Street North                  |
  35.  | Publish and be damned. Publish  | Manchester England M15 4EN          |
  36.  | electronically and be heard.    | Tel: +44 61 227 9055 Fax: 226 4922  |
  37.  +---------------------------------+-------------------------------------+
  38.